<?php 

// header("Content-type: json");
include "config.php";

$query = "SELECT * FROM items";

$res = mysqli_query($db, $query);

$arr = array();
$i = 0;

while($results = mysqli_fetch_assoc($res)){
	$arr[$i] = $results;
	$i++;
}

echo json_encode($arr);

?>